package org.tuskit.control {
    import com.adobe.cairngorm.control.FrontController;
    import org.tuskit.control.EventNames;
    import org.tuskit.command.*;

    public class TuskitController extends FrontController {
        public function TuskitController() {
            initializeCommands();
        }
        
        private function initializeCommands() : void {
        	addCommand(EventNames.CHECK_ADMIN_EXISTS,	CheckAdminExistsCommand);
            
            addCommand(EventNames.CREATE_MEMBERSHIP,		CreateMembershipCommand);
            addCommand(EventNames.CREATE_SESSION,		CreateSessionCommand);
            addCommand(EventNames.CREATE_USER, 			CreateUserCommand);
			
			addCommand(EventNames.DELETE_MEMBERSHIP,		DeleteMembershipCommand);
            addCommand(EventNames.DELETE_SESSION, 		DeleteSessionCommand);
            addCommand(EventNames.DELETE_USER, 			DeleteUserCommand);

            addCommand(EventNames.LIST_GROUPS, 			ListGroupsCommand);
            addCommand(EventNames.LIST_MEMBERSHIPS, 		ListMembershipsCommand);
            addCommand(EventNames.LIST_USERS,			ListUsersCommand);
            
            addCommand(EventNames.UPDATE_USER,			UpdateUserCommand);
        }
    }
}